Current protection for battery charger

ABSTRACT

A device includes a battery current sense circuit configured to generate a battery current feedback voltage based on a current provided to a battery, a current regulation feedback loop configured to regulate the current provided to the battery based on the battery current feedback voltage and a configurable battery current reference voltage, and a precharge regulation feedback loop configured to regulate the current provided to the battery based on the battery current feedback voltage and a configurable precharge reference voltage. The device also includes a processor configured to set the battery current reference voltage to a first value and set the precharge current reference voltage to a second value. The first value is less than the second value during a transition state.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims priority to U.S. Provisional PatentApplication No. 62/681,255, which was filed Jun. 6, 2018, is titled“Current Spike Protection In Battery Charger,” and is herebyincorporated herein by reference in its entirety.

SUMMARY

In accordance with at least one example of the disclosure, a deviceincludes a battery current sense circuit configured to generate abattery current feedback voltage based on a current provided to abattery, a current regulation feedback loop configured to regulate thecurrent provided to the battery based on the battery current feedbackvoltage and a configurable battery current reference voltage, and aprecharge regulation feedback loop configured to regulate the currentprovided to the battery based on the battery current feedback voltageand a configurable precharge reference voltage. The device also includesa processor configured to set the battery current reference voltage to afirst value and set the precharge current reference voltage to a secondvalue. The first value is less than the second value during a transitionstate.

In accordance with another example of the disclosure, a method forcharging a battery includes entering a transition state between a firstcharging state and a second charging state. A current provided to thebattery during the first charging state is less than a current providedto the battery during the second charging state. The method alsoincludes, during the transition state, controlling a transistor toregulate a current to the battery to a first value, and controlling apower converter to regulate the current to the battery to a secondvalue. The first value is less than the second value.

In accordance with yet another example of the disclosure, a method forcharging a battery includes operating a battery charger in a transitionstate by controlling a transistor to regulate a current to the batteryto a first value, and controlling a power converter to regulate thecurrent to the battery to a second value. The second value is less thanthe first value. The method also includes operating the battery chargerin a battery current regulation state after the transition state bycontrolling the power converter to regulate the current to the batteryto a third value, where the third value is greater than the secondvalue.

BRIEF DESCRIPTION OF THE DRAWINGS

For a detailed description of various examples, reference will now bemade to the accompanying drawings in which:

FIG. 1 shows a block diagram of an example battery-powered electronicdevice comprising a battery and an example battery charging integratedcircuit (IC) in accordance with an example;

FIG. 2 shows a circuit schematic diagram of a battery, a powerconverter, and a battery charging regulation IC (BCR IC) in a systemvoltage regulation state in accordance with an example;

FIG. 3 shows a circuit schematic diagram of the battery, the powerconverter, and the BCR IC in a battery current regulation state inaccordance with an example;

FIG. 4 shows a set of waveforms and an associated state diagramdemonstrating the BCR IC switching from the system voltage regulationstate to the battery current regulation state;

FIG. 5 shows a circuit schematic diagram of the battery, the powerconverter, and the BCR IC in a transition state in accordance with anexample; and

FIG. 6 shows a set of waveforms and an associated state diagramdemonstrating the BCR IC switching from the system voltage regulationstate, to the transition state, to the battery current regulation statein accordance with an example.

DETAILED DESCRIPTION

Various mobile electronic devices, such as smartphones and other mobilecomputing devices, are powered using batteries. Charging a battery is adifficult and possibly dangerous task, as overcharging can result inexcessive temperatures, fires, or explosions, and undercharging cancompromise long-term battery performance. In particular, large currentspikes during battery charging are suboptimal for battery safety andperformance.

A battery charging regulation circuit operates in different modes toregulate a voltage and current supplied to a battery during charging ora voltage supplied to the device system electronics (e.g.,microprocessors). In many cases, such as when the battery is not beingcharged and an adapter is plugged in, the system voltage is regulated toa higher value than the battery charging voltage. Thus, whentransitioning from a system voltage regulation mode to a batteryvoltage/current regulation mode, a large system capacitance is quicklydischarged to a lower voltage level, resulting in a large spike incurrent supplied to the battery. Further, and as will be described morefully below with respect to FIG. 2, a voltage regulation feedback loopquickly switches from regulating (e.g., by comparing to a referencevoltage) the system voltage to the battery voltage, which initially isvery low since the battery is not being charged. Since the batteryvoltage is initially lower than the reference voltage to which it isbeing compared, the voltage regulation feedback loop temporarilycontrols a power converter to supply even more current, which adds tothe current spike caused by the discharging of system capacitance.

Examples of the present disclosure include digital control logic thatcontrols a battery charging regulation integrated circuit in atransition state (e.g., before entering a battery current regulationstate) to mitigate the current spike explained above. In the transitionstate, the digital control logic causes a precharge regulation amplifierto control a battery transistor control terminal (e.g., a gate of atransistor) to regulate the current to the battery to a first level. Atthe same time, the digital control logic causes a current regulationamplifier to control a power converter to supply current to the batteryat a second level, lower than the first level.

The precharge regulation amplifier only controls a transistor gatevoltage, while the current regulation amplifier has a more complexcircuitry path (e.g., propagation through a power converter controllerand the power converter itself) to control the battery current. Thus,the precharge regulation amplifier bandwidth is larger (or response timeshorter) relative to the current regulation amplifier, and initially andquickly regulates the battery current to the first level. This gives thecurrent regulation amplifier time to take control of regulating thebattery current to the second, lower level without permitting a suddenspike in current caused by discharge of a system capacitance. In someexamples, the digital control logic then controls the battery chargingregulation integrated circuit in a battery current regulation state and,since the current regulation amplifier is already active and controllingthe power converter, the current to the battery increases withoutspiking. The battery charging regulation integrated circuitfunctionality and the transition state are explained below with respectto the accompanying figures.

FIG. 1 depicts a block diagram of an example battery-powered electronicdevice 100, such as a mobile device (e.g., a smartphone). The electronicdevice 100 comprises a battery 110 and a battery charging integratedcircuit (IC) 103 coupled to the battery 110. The battery 110 is anysuitable type of battery that is capable of providing power to theelectronic device 100 to enable the electronic device 100 to perform itsintended functions. In an example, the battery charging IC 103 is asingle chip housed inside a package. In an example, the battery chargingcircuitry is distributed across multiple chips, with all such chipshoused inside a single package. Other variations on the preciseconfiguration of the battery charging circuit are contemplated andincluded within the scope of this disclosure. The battery charging IC103 couples to a port 101 to which a power supply can couple. Forexample, a user is able to connect the port 101 to mains power via anadapter. FIG. 1 is merely an example device in which the batterycharging IC 103 can be implemented. Other applications, which includevarious other devices that use rechargeable batteries, will also findbenefit with the battery charging IC 103.

In operation, the battery charging IC 103 receives power via the port101 and uses the power to charge the battery 110. Specifically, thebattery charging IC 103 implements the techniques alluded to above anddescribed in greater detail below to achieve greater accuracy andprecision in proxy current measurements when charging the battery 110.As explained, these techniques are especially helpful when charging ofthe battery 110 is nearly complete and the charging current has beenreduced to a relatively small termination current that is difficult toaccurately and precisely measure.

FIG. 2 shows a circuit schematic diagram including the battery 110 andat least some portions of the battery charging IC 103, particularly theportions related to regulating the charging characteristics (e.g.,battery voltage, battery current, and a system voltage of the electronicdevice 100) for the battery 110 and the electronic device 100. A powerconverter 102 is coupled to the port 101 to receive an input voltage,for example from mains power via an adapter as explained above. Anoutput of the power converter 102 provides a system voltage (VSYS) tothe electronic device 100. The power converter 102 comprises abuck-boost converter as shown, but other examples that employ differentpower converter topologies are still within the scope of thisdisclosure. A system capacitor 104, which represents the capacitance ofthe electronic device 100 (CSYS), is coupled to the output of the powerconverter 102 and to ground.

A battery transistor 106 is also coupled to the output of the powerconverter 102 and to a current sense resistor 108. In this example, thebattery transistor 106 is a p-type metal-oxide-semiconductor fieldeffect transistor (MOSFET) having its gate coupled to a switch 107,which couples the gate to either VSYS, ground, or a precharge amplifier140 output, which will be explained in further detail below. The batterytransistor 106 controls a current flowing from the power converter 102to the battery 110 and through the current sense resistor 108. Thevoltage applied to the battery 110 is notated as VBAT.

A battery charging regulation integrated circuit (BCR IC) 112 controlsthe operation of the power converter 102 and of the battery transistor106. The BCR IC 112 includes a controller 114 for the power converter102, which controls the power converter 102 (in this example, bycontrolling the gate voltages of transistors of the power converter 102)based on a received input voltage (VCONTROL). For example, an increasein VCONTROL causes the controller 114 to increase the current (andoutput voltage as a result) provided by the power converter 102, while adecrease in VCONTROL causes the controller 114 to reduce the currentprovided by the power converter 102.

A voltage regulation feedback loop 116 includes a voltage regulationamplifier 118 (e.g., a differential amplifier) that comprises twoinputs: a first input 120 that is configured to receive a configurablereference voltage for either the battery 110 (VBAT_REF) or theelectronic device 100 (VSYS_REF) and a second input 122 that isconfigured to receive either a system feedback voltage (VSYS_FB) or abattery feedback voltage (VBAT_FB). VBAT_REF is provided by a batteryvoltage reference voltage source while VSYS_REF is provided by a systemvoltage reference voltage source (voltage sources not shown forsimplicity). In this example, VSYS_FB comprises VSYS divided by avoltage divider 121 and VBAT_FB comprises VBAT divided by a voltagedivider 123. An output of the voltage regulation amplifier 118 iscoupled to a blocking diode 124 (e.g., a transistor arranged as a sourcefollower) and provides VCONTROL to the controller 114.

A current regulation feedback loop 126 includes a current regulationamplifier 128 (e.g., a differential amplifier) that comprises twoinputs: a first input 130 that is configured to receive a configurablereference voltage (VIBAT_REF, provided by a battery current referencevoltage source, not shown for simplicity), whose value is correlated toa value of current supplied to the battery 110, and a second input 132that is configured to receive a voltage derived from the currentsupplied to the battery 110. For example, a battery current sensecircuit 134 senses a voltage across the current sense resistor 108 andgenerates a battery current feedback voltage (VIBAT_FB) that is based onthe voltage across the current sense resistor 108. An output of thecurrent regulation amplifier 128 is coupled to a blocking diode 136 andalso provides VCONTROL to the controller 114.

A precharge regulation feedback loop 138 includes a precharge regulationamplifier 140 (e.g., a differential amplifier) that comprises twoinputs: a first input 142 that is configured to receive a configurablereference voltage (VIPRECHG_REF, provided by a precharge currentreference voltage source, not shown for simplicity), whose value iscorrelated to a value of current supplied to the battery 110, and asecond input 144 that is configured to receive the voltage from thebattery current sense circuit 134, explained above. An output of theprecharge regulation amplifier 140 is coupled to the switch 107, whichselectively couples the output of the precharge regulation amplifier 140to the gate of the battery transistor 106.

Digital control logic 150, which comprises one or more processors in anexample, is coupled to the BCR IC 112 and is configured to control theinputs 120, 122, the switch 107 coupled to the gate of the batterytransistor 106, and the configurable reference voltages VBAT_REF,VSYS_REF, VIBAT_REF, and VIPRECHG_REF. In another example, VIBAT_REF andVIPRECHG_REF are fixed voltages, while the feedback voltages themselvesare configurable, for example through the use of different, controllablebattery current sense circuits for the current regulation amplifier 128and the precharge regulation amplifier 140. The scope of this disclosureis not limited to any particular approach to comparing a feedbackvoltage to a reference voltage.

In FIG. 2, the digital control logic 150 controls the BCR IC 112 in asystem voltage regulation state in which VSYS is regulated to aparticular value and the battery 110 is not being charged. The systemvoltage regulation state is useful, for example, when a power adapter isplugged into the port 101 and the battery 110 is fully charged, and thusonly the electronic device 100 and any potential load on VSYS drawspower. In the system voltage regulation state, the digital control logic150 controls the switch 107 to couple the gate of the battery transistor106 to a node at VSYS. In this example, since the battery transistor 106is a p-type MOSFET, the battery transistor 106 is off and thus preventscurrent from flowing to the battery 110. Since there is no currentflowing through the current sense resistor 108, the output of thebattery current sense circuit 134 is a correspondingly low voltage. Theprecharge regulation feedback loop 138 is inactive because the switch107 couples the gate of the battery transistor 106 to the node VSYS,which turns the battery transistor 106 fully off, and as a result nocurrent flows to the battery 110. The current regulation feedback loop126 is also inactive because the battery current sense circuit 134output is lower than VIBAT_REF set by the digital control logic, andthus the output of the current regulation amplifier 128 is negative (andblocked by the blocking diode 136).

In the system voltage regulation state, the digital control logic 150also controls the inputs 120, 122 of the voltage regulation feedbackloop 116 such that the first input 120 provides VSYS_REF to the voltageregulation amplifier 118 and the second input 122 provides VSYS_FB tothe voltage regulation amplifier 118. In the system voltage regulationstate then, the voltage regulation amplifier 118 generates VCONTROL tocause the controller 114 to control the power converter 102 to regulateVSYS to a desired level. For example, if VSYS is below a desired level,then VSYS_FB will be less than VSYS_REF, causing the voltage regulationamplifier 118 to increase VCONTROL, which in turn causes the controller114 to control the power converter 102 to increase its output voltage,VSYS. On the other hand, if VSYS is above the desired level, thenVSYS_FB will be greater than VSYS_REF, causing the voltage regulationamplifier 118 to decrease VCONTROL, which in turn causes the controller114 to control the power converter 102 to decrease its output voltage.

In FIG. 3, the digital control logic 150 controls the BCR IC 112 in abattery current regulation state in which current flowing to the battery110 (IBAT) is regulated to a particular value while the battery 110 isbeing charged. In the battery current regulation state, the digitalcontrol logic 150 controls the switch 107 to couple the gate of thebattery transistor 106 to ground. In this example, since the batterytransistor 106 is a p-type MOSFET, the battery transistor 106 is on andthus permits current flowing to the battery 110. Since there is acurrent flowing through the current sense resistor 108, the output ofthe battery current sense circuit 134 is a voltage that corresponds tothe amount of current flowing through the current sense resistor 108.

The digital control logic 150 also sets VIBAT_REF to a levelcorresponding to a desired amount of current to be supplied to thebattery 110. For example, if IBAT is regulated to 1 amp (A), and thatthe current sense resistor has a resistance of 0.01Ω, an input voltageto the battery current sense circuit 134 is 0.01 volt (V). In thisexample, the battery current sense circuit 134 is configured to generatean output that is eight times its input voltage, and thus generates anoutput voltage of 0.08V. Thus, VIBAT_REF would also be set to 0.08V,which corresponds to IBAT=1 A.

In the battery current regulation state then, the current regulationamplifier 128 generates VCONTROL to the cause the controller 114 tocontrol the power converter 102 to regulate IBAT to a desired level, ifthe current demanded by the voltage regulation feedback loop 116 ishigher than the current set by the value of VIBAT_REF. For example, ifthe voltage regulation feedback loop 116 tries to supply more current tothe battery 110 than what is set by the value of VIBAT_REF, the outputof the battery current sense circuit 134 is greater than the value ofVIBAT_REF. Thus, the battery regulation amplifier 128 output voltageincreases and takes control of VCONTROL from the voltage regulationamplifier 118, in which the blocking diodes 124, 136 function as ananalog OR gate. As a result, the controller 114 controls the powerconverter 102 to decrease its output current to the reference leveldetermined by the value of VIBAT_REF. Alternatively, if the currentdemanded by the voltage regulation feedback loop 116 is less than thecurrent limit set by the value of VIBAT_REF, the current regulationamplifier 128 output voltage is pulled down, rendering the currentregulation feedback loop 126 inactive due to the analog OR blockingdiodes 124, 136.

In the battery current regulation state, the digital control logic 150also controls the inputs 120, 122 of the voltage regulation feedbackloop 116 such that the first input 120 provides VBAT_REF to the voltageregulation amplifier 118 and the second input 122 provides VBAT_FB tothe voltage regulation amplifier 118. In the battery current regulationstate then, the voltage regulation amplifier 118 generates VCONTROL tocause the controller 114 to control the power converter 102 to regulateVBAT to a desired level. For example, if VBAT is below a desired level,then VBAT_FB will be less than VBAT_REF, causing the voltage regulationamplifier 118 to increase VCONTROL, which in turn causes the controller114 to control the power converter 102 to increase its output voltage,which is related to VBAT. On the other hand, if VBAT is above thedesired level, then VBAT_FB will be greater than VBAT_REF, causing thevoltage regulation amplifier 118 to decrease VCONTROL, which in turncauses the controller 114 to control the power converter 102 to decreaseits output voltage.

As explained above, in an example, VSYS is regulated to a higher valuethan VBAT. For example, VSYS is regulated to 4V, whereas a chargingvoltage for the battery 110 (VBAT during charging) is 3.8V. Thus, whentransitioning from the system voltage regulation state shown in FIG. 2to the battery current regulation state shown in FIG. 3, the systemcapacitor 104 is quickly discharged, resulting in a large spike in IBAT,the value of which in this example is CSYS*0.2V. Further, when thevoltage regulation feedback loop 116 switches from comparing VSYS_FB toVSYS_REF to comparing VBAT_FB to VBAT_REF, VBAT_FB is initially muchlower than VBAT_REF, which causes the voltage regulation amplifier 118to increase VCONTROL to a high level, resulting in the power converter102 supplying even greater current.

FIG. 4 shows a set of waveforms 400 that illustrates the transition fromthe system voltage regulation state shown in FIG. 2 to the batterycurrent regulation state shown in FIG. 3, as well as the resulting IBATspike. The VSYS waveform corresponds to the system voltage provided bythe power converter 102. The VBAT waveform corresponds to the voltage onthe battery 110. The IBAT waveform corresponds to the current providedto the battery 110. The BATDRV waveform corresponds to the gate voltageof the battery transistor 106. The VREG, IBAT_REG, and I_PRECHG LOOPwaveforms demonstrate the active/inactive time of the voltage regulationloop 116, the current regulation feedback loop 126, and the prechargeregulation feedback loop 138, respectively.

During the system voltage regulation state 402, VSYS is regulated to 4Vwhile VBAT is 3.8V; IBAT is 0 since the gate of the battery transistor106 (BATFET) is coupled to the node at VSYS and thus the batterytransistor 106 is off. Subsequently, when transitioning to the batterycurrent regulation state 404, VSYS drops from 4V to approximately 3.8V,or the value to which VBAT is regulated in the battery currentregulation state 404. This causes the system capacitor 104 to quicklydischarge, generating an IBAT spike corresponding to the charge on thecapacitor 104, which is equal to CSYS*0.2V. Further, as explained above,the initial behavior of the voltage regulation loop 116 to regulate VBATadditionally increases the magnitude of the IBAT spike.

FIG. 5 shows the digital control logic 150 controlling the BCR IC 112 ina transition state to mitigate the current spike issues described above.In the transition state, the digital control logic 150 controls theswitch 107 to couple the gate of the battery transistor 106 the outputof the precharge regulation amplifier 140. The digital control logic 150also sets VIPRECHG_REF to a level corresponding to a desired limit ofcurrent to be supplied to the battery 110 in the transition state (e.g.,200 milliamp (mA)). Since the precharge regulation amplifier 140 alsoreceives as input the output of the battery current sense circuit 134,the precharge regulation amplifier 140 regulates the gate voltage of thebattery transistor 106 to limit IBAT based on the value of VIPRECHG_REF.

At the same time, the digital control logic 150 also sets VIBAT_REF to alevel corresponding to a desired amount of current to be supplied to thebattery 110 in the transition state (e.g., 120 mA). Since the value ofVIBAT_REF during this time corresponds to a lower current than that ofVIPRECHG_REF, the current regulation feedback loop 126 becomes activesince it is trying to regulate IBAT to a lower value than that set bythe precharge regulation feedback loop 138. Thus, the controller 114 iscontrolled by VCONTROL to supply less current than set by the value ofVIPRECHG_REF, or to decrease the VSYS voltage as a result, whichdischarges the system capacitor 104. The precharge regulation amplifier140 need only control the gate voltage of the battery transistor 106 toinfluence IBAT, whereas the current regulation amplifier 128 output hasa more complex circuitry path (e.g., propagation through the controller114 and the power converter 102) to influence IBAT. As a result, abandwidth is larger (or response time shorter) of the prechargeregulation feedback loop 138 relative to the current regulation feedbackloop 126, and IBAT is initially limited by the value of VIPRECHG_REF(e.g., to 200 mA) and then limited by the value of VIBAT_REF (e.g., to120 mA) once the current regulation feedback loop 126 has taken controlto regulate VCONTROL and thus the controller 114 and power converter102.

In the transition state, the digital control logic 150 also controls theinputs 120, 122 of the voltage regulation feedback loop 116 such thatthe first input 120 provides VSYS_REF to the voltage regulationamplifier 118 and the second input 122 provides VSYS_FB to the voltageregulation amplifier 118. As explained above, the blocking diodes 124and 136 act as an analog OR circuit that determines whether the voltageregulation amplifier 118 or the battery current regulation amplifier 128controls VCONTROL. In the transition state, VCONTROL is controlled bythe voltage regulation amplifier 118 initially, and subsequently iscontrolled by the battery current regulation amplifier 128 once it hastaken control to limit IBAT (based on the bandwidth-related delayexplained above).

The system capacitor 104 does not initially discharge as the voltageregulation feedback loop 116 initially is active to regulate VSYS, thusmaintaining the charge on the system capacitor 104. However, theprecharge regulation feedback loop 138 initially controls IBAT due toits faster response time and thus gives the current regulation feedbackloop 126 time to overcome the bandwidth-related delay to take control ofVCONTROL. Once the current regulation feedback loop 126 takes control ofVCONTROL, the system capacitor 104 discharges although IBAT is regulatedby the current regulation feedback loop 126 controlling the powerconverter 102 via the output of the current regulation amplifier 128VCONTROL and the controller 114. After a time period in the transitionstate (e.g., sufficient to allow for system capacitor 104 discharge andfor the current regulation feedback loop 126 to take control), thedigital control logic 150 controls the BCR IC 112 to enter the batterycurrent regulation state described above with respect to FIG. 3. Thedigital control logic 150 first controls the BCR IC 112 in the systemvoltage regulation state as described with respect to FIG. 2, thencontrols the BCR IC 112 to enter the transition state described withrespect to FIG. 5, then controls the BCR IC 112 to enter the batterycurrent regulation state described with respect to FIG. 3.

Although the above describes the transition from a system voltageregulation state, to a transition state, to a battery current regulationstate, the transition state described herein is applicable to othercircumstances as well. In one example, the BCR IC 112 is initially in abattery precharge regulation state, in which the precharge regulationfeedback loop 138 is regulating IBAT by controlling the batterytransistor 106 and the voltage regulation feedback loop 116 isregulating VSYS. Then, prior to switching to a battery currentregulation state, the digital control logic 150 controls the BCR IC 112to enter the transition state described with respect to FIG. 5.

FIG. 6 shows a set of waveforms 600 that illustrates the transition fromthe system voltage regulation state shown in FIG. 2, to the transitionstate shown in FIG. 5, to the battery current regulation state shown inFIG. 3, as well as the resulting lack of spike in IBAT. The VSYSwaveform corresponds to the system voltage provided by the powerconverter 102. The VBAT waveform corresponds to the voltage on thebattery 110. The IBAT waveform corresponds to the current provided tothe battery 110. The BATDRV waveform corresponds to the gate voltage ofthe battery transistor 106. The VREG, IBAT_REG, and I_PRECHG LOOPwaveforms demonstrate the active/inactive time of the voltage regulationloop 116, the current regulation feedback loop 126, and the prechargeregulation feedback loop 138, respectively.

As above with respect to FIG. 4, during the system voltage regulationstate 602, VSYS is regulated to 4V while VBAT is 3.8V; IBAT is 0 sincethe gate of the battery transistor 106 (BATFET) is coupled to the nodeat VSYS and thus the battery transistor 106 is off. However, rather thantransitioning directly to the battery current regulation state as inFIG. 4, in FIG. 6, the digital control logic 150 first controls the BCRIC 112 in a transition state 604.

As explained with respect to FIG. 5, the digital control logic 150 setsVIPRECHG_REF to a level corresponding to a desired limit of current tobe supplied to the battery 110 in the transition state (e.g., 200 mA),and BATDRV is regulated accordingly. The digital control logic 150 alsosets VIBAT_REF to a level corresponding to a desired amount of currentto be supplied to the battery 110 in the transition state (e.g., 120mA), which in examples is lower than the limit set by VIPRECHG_REF. Dueto the bandwidth-related delay of the current regulation feedback loop126, the current regulation feedback loop 126 is initially inactive,demonstrated by the IBAT_REG LOOP waveform. During this time, VSYS ismaintained by the voltage regulation feedback loop 116 and the systemcapacitor 104 remains charged, while IBAT is regulated by the batterytransistor 106 and the precharge amplifier 140.

Once the current regulation feedback loop 126 takes control due to beingconfigured to regulate IBAT to a lower level than is being permitted bythe precharge regulation feedback loop 138, the system capacitor 104 isdischarged although IBAT is regulated by the current regulation feedbackloop 126. Additionally, IBAT decreases because the current regulationfeedback loop 126 is set to regulate IBAT to a lower level than IBAT waslimited to by the battery transistor 106. When the current regulationfeedback loop 126 becomes active, the current regulation amplifier 128regulates VCONTROL to cause the controller 114 to cause the powerconverter 102 to supply the desired IBAT value of 120 mA in thisexample. The precharge amplifier 140 continues to pull BATDRV lower toattempt to maintain an IBAT of 200 mA.

Once the current regulation feedback loop 126 is active, the systemcapacitor 104 is discharged, and in some examples BATDRV has been pulledsufficiently low, the digital control logic 150 controls the BCR IC 112in a battery current regulation state 606. The current regulationfeedback loop 126 is already active, avoiding the bandwidth issuesexplained above that led to a current spike, and the digital controllogic 150 sets VIBAT_REF to a level corresponding to a desired amount ofcurrent to be supplied to the battery 110 in the battery currentregulation state 606 (e.g., 1 A). Unlike in FIG. 4, the system capacitor104 is already discharged and thus a current spike is avoided. Theprecharge loop 138 is rendered inactive by coupling the gate of thebattery transistor 106 to ground, fully turning on the batterytransistor 106.

In the foregoing discussion and in the claims, the terms “including” and“comprising” are used in an open-ended fashion, and thus should beinterpreted to mean “including, but not limited to . . . .” Also, theterm “couple” or “couples” is intended to mean either an indirect ordirect connection. Thus, if a first device couples to a second device,that connection may be through a direct connection or through anindirect connection via other devices and connections. Similarly, adevice that is coupled between a first component or location and asecond component or location may be through a direct connection orthrough an indirect connection via other devices and connections. Anelement or feature that is “configured to” perform a task or functionmay be configured (e.g., programmed or structurally designed) at a timeof manufacturing by a manufacturer to perform the function and/or may beconfigurable (or re-configurable) by a user after manufacturing toperform the function and/or other additional or alternative functions.The configuring may be through firmware and/or software programming ofthe device, through a construction and/or layout of hardware componentsand interconnections of the device, or a combination thereof.Additionally, uses of the phrases “ground” or similar in the foregoingdiscussion are intended to include a chassis ground, an Earth ground, afloating ground, a virtual ground, a digital ground, a common ground,and/or any other form of ground connection applicable to, or suitablefor, the teachings of the present disclosure. Unless otherwise stated,“about,” “approximately,” or “substantially” preceding a valuemeans+/−10 percent of the stated value.

The above discussion is meant to be illustrative of the principles andvarious embodiments of the present disclosure. Numerous variations andmodifications will become apparent to those skilled in the art once theabove disclosure is fully appreciated. It is intended that the followingclaims be interpreted to embrace all such variations and modifications.

What is claimed is:
 1. A device, comprising: a battery current sensecircuit configured to generate a battery current feedback voltage basedon a current provided to a battery; a current regulation feedback loopconfigured to regulate the current provided to the battery based on thebattery current feedback voltage and a configurable battery currentreference voltage; a precharge regulation feedback loop configured toregulate the current provided to the battery based on the batterycurrent feedback voltage and a configurable precharge reference voltage;and a processor configured to: set the battery current reference voltageto a first value; and set the precharge current reference voltage to asecond value, wherein the first value is less than the second valueduring a transition state.
 2. The device of claim 1 further comprising avoltage regulation feedback loop configured to: in a system voltageregulation state, compare a system feedback voltage to a configurablesystem reference voltage; in response to the system feedback voltagebeing less than the system reference voltage, increase a currentprovided to a system voltage node; and in response to the systemfeedback voltage being greater than the system reference voltage,decrease a current provided to the system voltage node.
 3. The device ofclaim 2 wherein the voltage regulation feedback loop is furtherconfigured to: in a battery current regulation state, compare a batteryfeedback voltage to a configurable battery reference voltage; inresponse to the battery feedback voltage being less than the batteryreference voltage, increase a current provided to the battery; and inresponse to the battery feedback voltage being greater than the batteryreference voltage, decrease a current provided to the battery.
 4. Thedevice of claim 3 wherein the voltage regulation feedback loop comprisesan amplifier comprising: a non-inverting input configured to couple toone of a battery voltage reference voltage source and a system voltagereference voltage source; an inverting input configured to couple to oneof a system feedback voltage node at the system feedback voltage and abattery feedback voltage node at the battery feedback voltage; and anoutput configured to couple to a controller for the power converter. 5.The device of claim 4 wherein the processor is configured to: controlwhich voltage source couples to the non-inverting input; and controlwhich feedback voltage node couples to the inverting input.
 6. Thedevice of claim 4 wherein the processor is configured to: set a voltageof the battery voltage reference voltage source; and set a voltage ofthe system voltage reference voltage source.
 7. The device of claim 1wherein the current regulation feedback loop comprises an amplifiercomprising: a non-inverting input coupled to the battery current sensecircuit; an inverting input coupled to a battery current referencevoltage source; and an output configured to couple to a controller forthe power converter.
 8. The device of claim 7 wherein the processor isconfigured to set a voltage of the battery current reference voltagesource.
 9. The device of claim 1 wherein the precharge regulationfeedback loop comprises an amplifier comprising: a non-inverting inputcoupled to the battery current sense circuit; an inverting input coupledto a precharge current reference voltage source; and an outputconfigured to couple to a control terminal of a transistor coupled tothe battery.
 10. The device of claim 9 wherein the processor isconfigured to set a voltage of the precharge current reference voltagesource.
 11. The device of claim 9 wherein the processor is configured tocouple one of a system voltage node, a ground node, or the output of theamplifier to the control terminal of the transistor.